package com.welsy.newsmgt.model
{
   import com.adobe.cairngorm.model.ModelLocator;
   import mx.collections.ArrayCollection;
   import mx.collections.ICollectionView;
   import com.welsy.user.vo.NewsVO;     
     
   [Bindable]
   public class NewsMgtModelLocator implements ModelLocator
   {
      private static var modelLocator : NewsMgtModelLocator;
      
      public static function getInstance() : NewsMgtModelLocator 
      {
      	if ( modelLocator == null )
      	{
      		modelLocator = new NewsMgtModelLocator();
      	}
      		
      	return modelLocator;
      }
      
      //Constructor should be private but current AS3.0 does not allow it yet (?)...
      public function NewsMgtModelLocator() 
      {	
         if ( modelLocator != null )
         {
         	throw new Error( "Only one NewsMgtModelLocator instance should be instantiated" );	
         }
         
         //assets = new CairngormCourseAssets();
      }
    
      public var currentNews : NewsVO = null;
	  public var newsList : ArrayCollection = null;
	  public var newsRemovalSucceeded : Boolean = false;
	  public var newsSaveSucceeded : Boolean = false;
   }

}
